package cn.tedu.front.details.startup;

import cn.tedu.front.details.service.ICompanyService;
import cn.tedu.front.details.service.IJobService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

@Component
public class JobCustomRunner implements ApplicationRunner {
    @Autowired
    private IJobService jobService;
    @Autowired
    private ICompanyService companyService;
    @Override
    public void run(ApplicationArguments args) throws Exception {
        jobService.rebuildCache();
        companyService.rebuildCache();
    }
}
